<?php
require_once('DoodleDAO.php');
require_once('Author.php');
class Doodle
{

	public $id;
	public $title;
	public $description;
	public $path;
	public $url;
	public $author;
	private $dao;

	public function __construct($id, $title, $desc, $url, $authorId)
	{

		$this->id = $id;
		$this->title = $title;
		$this->description = $desc;
		$this->url = $url;
		$this->author = Author::findById($authorId);
		$this->dao = new DoodleDAO();

	}

	public static function findByAuthor($author)
	{
		
	}

	public static function findById($id)
	{
		$dao = new DoodleDAO();
		return $dao->findById($id);
	}	

	public static function findAll()
	{
		
	}	

	public static function findRandom()
	{
		$dao = new DoodleDAO();
		return $dao->findRandom();
	}	

}
?>